package com.ruoyi.project.constant.statuEnum;

/**
 * 未...
 * 已....
 */
public enum IsStatus {

    YES(0,"是"),
    NO(1,"否");

    private final Integer code;
    private final String info;

    IsStatus(Integer code, String info)
    {
        this.code = code;
        this.info = info;
    }

    public Integer getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }

    public static String getValue(Integer code) {
        for (IsStatus ele : values()) {
            if(ele.getCode() == code) return ele.getInfo();
        }
        return null;
    }


    public static IsStatus getStatus(Integer code) {
        for (IsStatus ele : values()) {
            if(ele.getCode() == code) return ele;
        }
        return null;
    }
}
